<%@include file="/WebPages/Includes/header.jsp"%>
<body>
	<script type="text/javascript">
		$(document).ready(function() {

			$.ajax({
				url : '/easyskool/rest/userauthservice/logout',
				type : 'POST',
				data : '{}',
				dataType : 'json',
				contentType : "application/json; charset=utf-8",
				success : function(data, testStatus, response) {
					$a = response.responseText;

					var json = JSON.parse(response.responseText);// $.parseJSON(response.responseText);
					alert(json.statusCode);
					if (json.statusCode == 200) {
						if (json.logout == "success") {
							window.location = "/easyskool/Login/login.jsp";
						}
					} else {
						window.location = "/easyskool/Error.jsp";
					}
				}
			});

		});
	</script>
</body>
</html>